<extend name="layout/main" />

<block name="HEADER">
    <load:css src="/admins/views/system/userMng/index.css" />
    <style type="text/css">
    	.w_content{
    	    background: #FFFFFF !important;
    	    padding: 0 !important;
    	}
    </style>
</block>

<block name="CONTENT">
    
    <div class="wrapper">
        <div class="layui-row">
            <div class="layui-col-xs3" >
                <div class="panel-heading" style="display: flex ;">
                    <h1>系统组织架构(角色)</h1>
                </div>
                <div id="tree"></div>
            </div>
            <div class="layui-col-xs9">
                <div class="panel-heading" >
                    <control:search id="searchs" />
                </div>
                <div class="content">
                    <control:grid  id="grid" padding="0"/>
                </div>    
            </div>
        </div>
    </div>
    
    <!--授权列表模板-->
    <script type="text/html" id="actionList_tpl">
        <style type="text/css">.xw-layui-layer .layui-layer-content{padding: 0px;}</style>
        <form  class="form-style form-line J-tplRoleFuncRight">
            <div class="layui-tab  layui-tab-brief">
                <ul class="layui-tab-title">
                    {{each list as nav key}}
                        <li class="{{key == 0 ? 'layui-this' : ''}}">
                        	{{nav.nav_name}}
                        </li>
                    {{/each}}
                </ul>
                <div class="layui-tab-content">
                    {{each list as nav key}}
                        <div class="layui-tab-item {{key == 0 ? 'layui-show' : ''}}">
                        	<dl class="dlList">
	                            {{if nav.action[0] && nav.nav_url}}
	                                <dt>当前<span class="checkAll">[全选]</span></dt>
	                                <dd>
	                                    {{each nav.action as action}}
	                                        <label>
	                                            <input type="checkbox" 
	                                            	name="{{nav.func_code}}" 
	                                            	value="{{action.action_code}}"
	                                            	{{action.check ? 'checked' : ''}}
	                                           	>{{action.action_name}}{{action.action_code}}
	                                        </label>
	                                    {{/each}}
	                                </dd>
	                            {{/if}}
	                            
	                        	{{each nav.children as  navChildren}}
	                           	 	{{if navChildren.action[0]}}
		                                <dt>{{navChildren.nav_name}}<span class="checkAll">[全选]</span></dt>
		                                <dd>
		                                    {{each navChildren.action as action}}
		                                    <label>
		                                       <input type="checkbox" 
		                                       		name="{{navChildren.func_code}}" 
		                                       		value="{{action.action_code}}"
		                                       		{{action.check ? 'checked' : ''}}
		                                       	>{{action.action_name}}{{action.action_code}}
		                                    </label>
		                                    {{/each}}
		                                </dd>
	                                {{/if}}
	                            {{/each}}
	                            
                           	</dl>
                        </div>
                    {{/each}}
                </div>
            </div>
        </form>
    </script>
    
</block>

<block name="FOOTER">
    <load:js src="/admins/views/system/userMng/index.js" />
</block>



